package com.istock.user.controller.vue;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.istock.base.common.api.model.ApiBaseResponse;
import com.istock.base.common.api.model.RetStatusEnum;
import com.istock.union.user.model.Constants;
import com.istock.union.user.model.UserInfo;
import com.istock.union.user.service.UserInfoService;

@Controller
@RequestMapping("/s/userInfo")
public class VueUserInfoController {

	@Autowired
    private UserInfoService userService;
	
	@RequestMapping("/selectUserById")
    @ResponseBody
    public ApiBaseResponse<UserInfo> selectUserById(String id) {
        UserInfo user = userService.selectUserDetailsById(id);
        return new ApiBaseResponse<UserInfo>(RetStatusEnum.SUCCESS,Constants.API_RESPONSE_SUCCESS_CODE, 
                Constants.API_RESPONSE_SUCCESS_MESSAGE, user);
    }
}
